package com.sbt.demo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;


@SpringBootApplication
@MapperScan("com.sbt.demo.mapper")
public class App 
{
	private static String APP_NAME = "mydemo";

	public static void main(String[] args) {
		long startTime = System.currentTimeMillis();
		System.out.println(APP_NAME + "平台启动中...");
		ApplicationContext ctx = SpringApplication.run(App.class, args);
		long endTime = System.currentTimeMillis();
		String[] beanNames = ctx.getBeanDefinitionNames();

		System.out.println("启动耗时：" + (endTime - startTime) + " ms,port " + ctx.getEnvironment().getProperty("server.port"));
		System.out.println(APP_NAME + "平台启动成功，加载spring组件个数：" + beanNames.length);
	}
}
